package org.taohuawu.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.taohuawu.pojo.Order;
import org.taohuawu.service.fallback.OrderFeignServiceFallback;
import org.taohuawu.web.util.JsonResult;

@FeignClient(name = "order-service", fallback = OrderFeignServiceFallback.class)
@RequestMapping("/order")
public interface OrderFeignService {
    @GetMapping("/{orderId}")
    public JsonResult<Order> getOrder(@PathVariable String orderId);

    @GetMapping("/")
    public JsonResult addOrder();
}
